#include <stdio.h>
#include "stack.h"

int main(int argc, const char *argv[])
{
    int *databuf;
    stack_t *p;
    p = create_stack(10);
    push_stack(p, 10);
    push_stack(p, 20);
    push_stack(p, 30);
    print(p);
    get_top_stack(p, databuf);
    printf("栈顶数据为：%d\n", *databuf);
    pop_stack(p, databuf);
    printf("出顶：%d\n", *databuf);
    get_top_stack(p, databuf);
    printf("栈顶数据为：%d\n", *databuf);
    exit(0);
}

